<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title>Insert title here</title>
</head>
<body>
 <input class="" type="button" value="添加记录"/>

<table class="tablestyle">
<thead>
<tr>
<th class="th0">id</th>
<th class="th1">项目名称</th>
<th class="th4">任务名称</th>
<th class="th2">预算金额</th>
<th class="th3">成本</th>
<th class="th5">操作</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>DataBind</td>
<td>DataBind</td>
<td>DataBind</td>
<td>DataBind</td>
<td>DataBind</td>
</tr>
<tr>
<td>2</td>
<td>DataBind</td>
<td>DataBind</td>
<td>DataBind</td>
<td>DataBind</td>
<td>DataBind</td>
</tr>
<tr>
<td>3</td>
<td>DataBind</td>
<td>DataBind</td>
<td>DataBind</td>
<td>DataBind</td>
<td>DataBind</td>
</tr>
<tr>
<td>4</td>
<td>DataBind</td>
<td>DataBind</td>
<td>DataBind</td>
<td>DataBind</td>
<td>DataBind</td>
</tr>
<tr>
<td>5</td>
<td>DataBind</td>
<td>DataBind</td>
<td>DataBind</td>
<td>DataBind</td>
<td>DataBind</td>
</tr>
<tr>
<td>6</td>
<td>DataBind</td>
<td>DataBind</td>
<td>DataBind</td>
<td>DataBind</td>
<td>DataBind</td>
</tr>
</tbody>
</table>
</body>
</html>


<script type="text/javascript">
  function getResult() {
var url = "servlet/BindProjectBaseInfo?state=all"; 
//var url = "servlet/SelectCityServlet?state=all"; 
　　 if (window.XMLHttpRequest) { 
　　 req = new XMLHttpRequest(); 
　　 }else if (window.ActiveXObject) { 
　　 req = new ActiveXObject("Microsoft.XMLHTTP"); 
　　 } 
　　 if(req){ 
　　 req.open("GET",url, true); 
　　 req.onreadystatechange = complete; 
　　 req.send(null); 
　　 } 
} 
function complete(){
　　 if (req.readyState == 4) { 
　　 if (req.status == 200) { 
　　// var city = req.responseXML.getElementsByTagName("city"); 
　//alert(req.responseText);
var data = req.responseText;
document.getElementById('projectbaseinfo').innerHTML = template.render('projectBaseInfoTable', data);
　　 }
　　 }
}
function buildSelect(str,sel) {
　　 sel.options.length=0;
　　 for(var i=0;i<str.length;i++) {
　　 sel.options[sel.options.length]=new Option(str[i],str[i])
　　 }
}
</script>